<template>
	<view class="p10">
		<view class="flexCenter juCen f18 bold name">{{content.noticeTitle}}</view>
		<view class="sbew">
			<view class="flexCenter f14"><view class="mets_name">发布者：</view><view class="mets">{{content.createBy}}</view></view>
			<view class="flexCenter f14"><view class="mets_name">时间：</view><view class="mets">{{content.createTime}}</view></view>
		</view>
		<view class=" f14" style="display: flex;"><view class="mets_name">浏览量：</view><view class="mets">{{content.browseNum}}</view></view>
		<view class="product_details" v-html="contents">
			<!-- <rich-text  :nodes="contents"></rich-text> -->
		</view>
	</view>
</template>

<script>
	import uniSegmentedControl from '@/components/uni-segmented-control/uni-segmented-control.vue';
	import submit from "@/serve/api/submit.js"
	export default {
		components: {
			uniSegmentedControl
		},  
		data(){
			return{
				id:'',
				content:'',
				contents:'',
			}
		},
		onLoad(opction) {
			var that = this
			that.id = opction.id
			that.systemst()
		},
		methods:{
			//系统通知
			async systemst() { 
				var that = this
				let parame = {
					noticeId: that.id,
				}
				const res = await submit.selectNoticeInfo(parame);
				if (res) {
					that.content = res.data.data
					// var richtext=  res.data.data.noticeContent;
					//  const regex = new RegExp('<img', 'gi');
					//  richtext= richtext.replace(regex, `<img style="max-width: 100%;"`);
					 that.contents = res.data.data.noticeContent;
				}
			},
			
		}
	}
</script>

<style>
	page{
		background-color: #FFFFFF;
	}
	.name{
		padding: 15px 0;
		background-color: #FFFFFF;
	}
	.p10{
		padding: 0 12px;
		background-color: #FFFFFF;
	}
	.flexCenter {
	    display: flex;
	    align-items: center;
		justify-content:center;
	}
	.sbew{
		display: flex;
		align-items: center;
		justify-content:space-between;
	}
	.bold {
	    font-weight: bold;
	}
	.f18 {
	    font-size: 18px;
	}
	
	
	.product_details {
		width: 100%;
		margin-top: 15px;
		font-size: 14px;
		line-height: 27px;
	}
	.mets_name{
		color: #989BA6;
	}
	.mets{
		color: #34363D;
	}
	
</style>
